#include <iostream>
#include <vector>
using namespace std;

void print_vector(const vector<int>& v)
{
	vector<int>::const_iterator it = v.begin();
	while (it < v.end())
	{
		cout << *it << ' ';
		it++;
	}
	cout << endl;
}


void test1()
{
	vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(4);
  size_t i = 0;
	for (i = 0; i < v1.size(); i++)
	{
		cout << v1[i] << ' ';
	}
	cout << endl;

	vector<int> v2(v1);

	for (i = 0; i < v2.size(); i++)
	{
		cout << v2[i] << ' ';
	}
	cout << endl;

	vector<int>::iterator it = v2.begin();
	while (it < v2.end())
	{
		cout << *it << ' ';
		it++;
	}
	cout << endl;


	vector<int> v3;
	v3.push_back(10);
	v3.push_back(20);
	v3.push_back(30);
	v3.push_back(40);
	v3.push_back(50);
	v1 = v3;

	vector<int>::iterator it1 = v1.begin();
	while (it1 < v1.end())
	{
		cout << *it1 << ' ';
		it1++;
	}
	cout << endl;


}


void test2()
{
	vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(4);
	v1.push_back(5);
	v1.push_back(6);
	v1.push_back(1);
	v1.push_back(1);
	v1.push_back(1);
	v1.push_back(7);

	cout << v1.size() << endl;
	cout << v1.capacity() << endl;
}



int main()
{
	test1();
	test2();
	return 0;
}
